API V3 to API V4

您所在的位置:网站首页 gitlab 查看版本 API V3 to API V4

API V3 to API V4

2023-08-31 20:03| 来源: 网络整理| 查看: 265

API V3 to API V4API V3 to API V48.179.0API V3 to API V4

原文:https://docs.gitlab.com/ee/api/v3_to_v4.html

8.179.0 API V3 to API V4

从 GitLab 9.0 开始,API V4 是首选的版本.

API V3 从 GitLab 9.5 不支持的,在 8 月 22 日公布,2017 年 API V3 中取出GitLab 11.0 . V3 API 文档仍然可用 .

以下是 V3 和 V4 之间所做的更改.

8.17 Removed GET /projects/:search (use: GET /projects?search=x) !8877iid过滤器已从GET /projects/:id/issues !8967 中删除.GET /projects/:id/merge_requests?iid[]=x&iid[]=y数组过滤器已重命名为iids !8793GET /projects/merge_request/:id下的端点已被删除(使用: GET /projects/merge_requests/:id ) !8793项目摘要不返回不建议使用的字段expires_at !8723GET /projects/:id/keys下的端点已被删除(使用GET /projects/:id/deploy_keys ) !8716 9.0 当成员已经存在时,为POST /projects/:id/members返回状态 409 !9093Moved DELETE /projects/:id/star to POST /projects/:id/unstar !9328删除了以下不建议使用的模板端点(仍然可以使用/templates前缀访问这些端点) !8853 /licenses/licenses/:key/gitignores/gitlab_ci_ymls/dockerfiles/gitignores/:key/gitlab_ci_ymls/:key/dockerfiles/:key Moved POST /projects/fork/:id to POST /projects/:id/fork !8940Moved DELETE /todos to POST /todos/mark_as_done and DELETE /todos/:todo_id to POST /todos/:todo_id/mark_as_done !9410项目过滤器不再作为GET /projects/foo ,而是作为GET /projects?foo=true代替!8962 GET /projects/visible和GET /projects/all合并到GET /projects ,可以在有或没有授权的情况下使用GET /projects/owned移至GET /projects?owned=trueGET /projects/starred移至GET /projects?starred=true GET /projects返回当前用户可见的所有项目,即使该用户不是成员!9674 要获取用户所属的GET /projects?membership=true ,请使用GET /projects?membership=true 返回所有返回数组的端点的分页头!8606添加了POST /environments/:environment_id/stop以停止环境!8808删除了DELETE /projects/:id/deploy_keys/:key_id/disable 使用DELETE /projects/:id/deploy_keys/:key_id代替!9366Moved PUT /users/:id/(block|unblock) to POST /users/:id/(block|unblock) !9371使订阅 API 更 RESTful. 使用POST /projects/:id/:subscribable_type/:subscribable_id/subscribe进行订阅,并使用POST /projects/:id/:subscribable_type/:subscribable_id/unsubscribe取消订阅资源. !9325标签在GET /projects/:id/issues上过滤,并且GET /issues现在仅匹配包含所有标签的问题(即:逻辑 AND,而非 OR) !8849将参数branch_name重命名为在以下端点上branch !8936 POST /projects/:id/repository/branchesPOST /projects/:id/repository/commitsPOST/PUT/DELETE :id/repository/files 改名merge_when_build_succeeds参数merge_when_pipeline_succeeds以下端点: !9335 PUT /projects/:id/merge_requests/:merge_request_id/mergePOST /projects/:id/merge_requests/:merge_request_id/cancel_merge_when_pipeline_succeedsPOST /projectsPOST /projects/user/:user_idPUT /projects/:id Renamed branch_name to branch on DELETE /projects/:id/repository/branches/:branch response !8936从项目的创建和编辑操作中删除public参数!8736从返回问题列表或合并请求的响应中删除已subscribed字段. 获取单个问题或合并请求以获取已subscribed !9661的值在各处使用visibility作为字符串参数!9337Notes do not return deprecated field upvote and downvote !9384创建或更新成员时,针对所有验证错误返回 HTTP 状态代码400 ,而不是有时为422错误. !9523删除GET /groups/owned . 使用GET /groups?owned=true代替!9505在 V4 API 上以异步删除方式返回带有 JSON 正文的 202( DELETE /projects/:id/repository/merged_branches和DELETE /projects/:id ) !9449GET /projects/:id/milestones?iid[]=x&iid[]=y数组过滤器已重命名为iids !9096在GET /projects/:id/pipelines返回有关管道的基本信息!8875将所有build参考重命名为job !9463Drop GET /projects/:id/repository/commits/:sha/jobs !9463Rename Build Triggers to be Pipeline Triggers API !9713 将构建触发器重命名为管道触发器 API !9713 POST /projects/:id/trigger/builds to POST /projects/:id/trigger/pipeline POST /projects/:id/trigger/builds到POST /projects/:id/trigger/pipelineRequire description when creating a new trigger POST /projects/:id/triggers 创建新触发器POST /projects/:id/triggers时需要说明POST /projects/:id/triggers 简化环境端点上暴露的项目有效负载!9675API uses merge request IIDs (internal ID, as in the web UI) rather than IDs. This affects the merge requests, award emoji, todos, and time tracking APIs. !9530API 使用问题IID (内部 ID,如 Web UI),而不使用ID . 这会影响问题,奖励表情符号,待办事项和时间跟踪 API. !9530将GET /projects/:id/repository/commits上的初始页面从0更改为1 (类似于 API 的其余部分) !9679返回正确的GET /projects/:id/repository/commits Link标头数据!9679更新存储库文件的端点!9637 将GET /projects/:id/repository/files?file_path=:file_path移到GET /projects/:id/repository/files/:file_path ( :file_path应该用 URL 编码)GET /projects/:id/repository/blobs/:sha现在返回由:sha标识的 blob 的 JSON 属性,而不是查找由:sha标识的提交,并在必需的?filepath=:filepath标识的那个提交中返回 blob 的原始内容?filepath=:filepath将GET /projects/:id/repository/commits/:sha/blob?file_path=:file_path和GET /projects/:id/repository/blobs/:sha?file_path=:file_path移至GET /projects/:id/repository/files/:file_path/raw?ref=:shaGET /projects/:id/repository/tree参数ref_name已重命名为ref以保持一致性 confirm为参数POST /users已被弃用,取而代之的skip_confirmation参数


【本文地址】


今日新闻


推荐新闻


CopyRight 2018-2019 办公设备维修网 版权所有 豫ICP备15022753号-3